﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace com.demo
{
    public partial class UploadProgressForm : Form
    {
        

        // 是否启用
        public bool AjaxEnabled
        {
            get { return this.ckEnabled.Checked; }
        }

        public int DueTime
        {
            get
            {
                int dueTime = 0;
                int.TryParse(this.tbDueTime.Text, out dueTime);
                return dueTime;
            }
        }

        public int Period
        {
            get
            {
                int period = 500;
                int.TryParse(this.tbPeriod.Text, out period);
                return period;
            }
        }

        public string CallbackFunc
        {
            get { return this.tbCallbackFunc.Text; }
        }


        // 构造函数
        public UploadProgressForm()
        {
            InitializeComponent();
        }

        public UploadProgressForm(bool enabled, int dueTime, int period, string callbackFunc)
        {
            InitializeComponent();
            this.ckEnabled.Checked = enabled;
            this.tbDueTime.Text = dueTime.ToString();
            this.tbPeriod.Text = period.ToString();
            this.tbCallbackFunc.Text = callbackFunc;
        }


        private void btnOk_Click(object sender, EventArgs e)
        {

        }

        private void UploadProgressEditor_Load(object sender, EventArgs e)
        {

        }
    }
}
